#include "stdafx.h"
#include "profilertest.h"
#include "profiler.h"
#include "specprivate.h"

ProfilerTest::ProfilerTest()
{

}

void ProfilerTest::testProfilerSave()
{
    Profiler profiler;

    SpecPrivate* p = new SpecPrivate;
    p->name = "test";
    p->enable = "1";
    profiler.add(p);

    SpecPrivate* p1 = new SpecPrivate;
    p1->name = "test";
    p1->enable = "1";
    profiler.add(p1);

    QCOMPARE(profiler.save("test.xml"), true);
}

void ProfilerTest::testProfilerLoad()
{
    Profiler profiler;
    QCOMPARE(profiler.read("test.xml"), true);
}
